Visual odometry using object priors

ABSTRACT

Disclosed are techniques for more accurately estimating the pose of a camera used to capture a three-dimensional scene. Accuracy is enhanced by leveraging three-dimensional object priors extracted from a large-scale three-dimensional shape database. This allows existing feature matching techniques to be augmented by generic three-dimensional object priors, thereby providing robust information about object orientations across multiple images or frames. More specifically, the three-dimensional object priors provide a unit that is easier and more reliably tracked between images than a single feature point. By adding object pose estimates across images, drift is reduced and the resulting visual odometry techniques are more robust and accurate. This eliminates the need for three-dimensional object templates that are specifically generated for the imaged object, training data obtained for a specific environment, and other tedious preprocessing steps. Entire object classes identified in a three-dimensional shape database can be used to train an object detector.

FIELD OF THE INVENTION

This disclosure relates generally to computer vision analysis, and more specifically to techniques for using object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene.

BACKGROUND

In the field of computer vision, “visual odometry” refers to the process of inferring the pose of a camera by analyzing a collection of images captured using the camera. As used herein, the “pose” of a camera refers to the location and orientation of the camera. A typical visual odometry application will involve estimating a series of camera poses from a set of point correspondences identified in image pairs that depict a three-dimensional scene. In some cases the camera poses are estimated using two-dimensional imagery, while in other cases a more accurate estimate can be achieved by using a three-dimensional template to register image pairs. In either case, the analyzed images may comprise, for example, a collection unorganized still images, frames extracted from a video recording, or some combination thereof. Algorithms used to perform visual odometry are often referred to as Structure from Motion (SFM) or Simultaneous Localization and Mapping (SLAM) algorithms. Computationally efficient and accurate visual odometry algorithms are valuable because they enable a wide range of applications such as three-dimensional image-based modeling and rendering, video stabilization, panorama stitching, video augmentation, vision-based robot navigation, and human-computer interaction. For example, in filmmaking SFM algorithms enable match moving techniques that allow computer-generated imagery (CGI) to be seamlessly integrated into live-action footage with correct position, scale, orientation, and motion.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram schematically illustrating one way of using object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene.

FIG. 2 is a block diagram schematically illustrating selected components of an example computer system that can be used to leverage object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene.

FIGS. 3A and 3B comprise a flowchart illustrating an example technique for using object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene.

FIG. 4 is a diagram illustrating relative camera rotation and translation [R_(ij)|t_(ij)] between an ith camera position and a jth camera position, as well as a corresponding object-to-camera rotation and translation [R_(αj)|t_(αij)] between the jth camera position and an αth object prior.

FIG. 5 comprises three graphs illustrating a predicted camera angle for azimuthal, elevational, and in-plane (θ) rotation as a function of frame number in a video recording of an example three-dimensional scene.

FIG. 6 is a table comparing estimated camera trajectories calculated with and without the use of object priors extracted from a large-scale three-dimensional shape database.

DETAILED DESCRIPTION

Existing visual odometry techniques rely on feature matching between images to estimate camera pose. Because feature matching techniques tend to be highly localized within a given image, they tend to be brittle and often fail to estimate correct feature correspondences between images. As a result, a number of improvements have been proposed to enhance the reliability and accuracy of the feature matching algorithms that support visual odometry techniques. For example, as noted above, using a three-dimensional template to register image pairs can produce more accurate feature matching between images. However, as a practical matter, accurate three-dimensional models for the objects in an imaged scene are often unavailable. Generating such models usually involves tedious preprocessing steps to analyze a particular imaged scene. In many cases this preprocessing may be impossible or impractical. Other visual odometry improvements require large scale training data, and are thus practical only where a camera is to be localized in a previously captured environment. These drawbacks are representative of the challenge associated with improving existing visual odometry techniques.

In recognition of this challenge, disclosed herein are techniques for using object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene. This allows existing feature matching techniques to be augmented by generic three-dimensional object priors, thereby providing robust information about object orientations across multiple frames of a given sequence of images. Because feature matching techniques only provide relative camera poses between two images, noise can accumulate over an analysis of several images. But object priors can be independently computed for multiple images, thereby providing absolute object prior information with respect to static objects in the scene. In other words, the three-dimensional object priors provide a unit that is easier and more reliably tracked across a sequence of images than a single feature point across an image pair. By adding object pose estimates across images, drift is reduced and the resulting visual odometry techniques are more robust and accurate. Certain of the improvements disclosed herein thus take advantage of the growing accessibility of large-scale three-dimensional shape databases that depict common objects, as well as recent advances in neural networks used for object detection. Such improvements also eliminate the need for three-dimensional object templates that are specifically generated for the imaged object, training data obtained for a specific environment, and other tedious preprocessing steps. In other words, instead of requiring an exact three-dimensional model of a specific imaged object, entire object classes that are identified in a three-dimensional shape database can instead be used to train an object detector. These and other advantages will be apparent in light of the disclosure provided herein.

FIG. 1 is a diagram schematically illustrating one way of using object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene. A three-dimensional object 10 is imaged from a plurality of different camera positions 12. This could be accomplished by panning a video camera around object 10 as the camera records a sequence of video frames at camera positions 12. It could additionally or alternatively be accomplished by snapping still photographs of object 10 at different camera positions 12, either using a single camera or multiple cameras. In either case, it should be appreciated that the techniques disclosed herein can be used with casually captured monocular videos or image collections, including images curated from diverse sources such as Internet search engines. A distinct camera position may be assumed for each image or frame in an image sequence. Regardless of how the source imagery is acquired, camera positions 12 will be unknown. A visual odometry technique 1000 that leverages object priors extracted from a large-scale three-dimensional shape database 320 is then invoked. As a baseline, any suitable existing feature matching technique can be performed on the source imagery. But the results of such technique are augmented by adding constraints on relative object positions between images based on the identified three-dimensional object priors. More specifically, the identified object priors constrain relative object poses across frames, and therefore provide a more accurate estimate of the different camera positions 12. These estimates can be combined into an aggregate estimated camera trajectory 60. As noted above, estimated camera trajectory 60 can be used in a wide range of applications including three-dimensional image-based modeling and rendering, video stabilization, panorama stitching, video augmentation, vision-based robot navigation, and human-computer interaction. Numerous alternative configurations and modifications of this workflow will be apparent in light of this disclosure.

In the following detailed description, numerous specific details are set forth to provide a thorough understanding of how to use object priors extracted from a large-scale three-dimensional shape database to more accurately estimate camera poses and trajectories. However, it should be appreciated that the claimed subject matter may be practiced without these specific details. Furthermore, in some cases, methods, apparatuses, or systems that would be known by an ordinarily-skilled artisan have not been described in detail so as not to obscure claimed subject matter. It should also be appreciated that certain of the techniques disclosed herein can also be used in other applications where efficient, robust, and accurate feature matching is sought, even outside the context of visual odometry applications.

Some portions of the detailed description which follow are presented in terms of algorithms, equations, or other symbolic representations of operations on binary digital signals stored within a memory of a specific apparatus of a special purpose computing device or platform. In this context, the term “specific apparatus” or the like includes a general purpose computer once it is programmed to perform particular functions pursuant to instructions from program software. Algorithmic descriptions or symbolic representations are examples of techniques used by ordinarily-skilled artisans in the signal processing and related arts to convey the substance of their work to others. As used herein, the term “algorithm” refers, in addition to its ordinary meaning, to a self-consistent sequence of operations or similar signal processing that leads to a desired result. In this context, operations or signal processing involve physical manipulation of physical quantities. Typically, although not necessarily, such physical quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, or otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to such signals as bits, data, values, elements, symbols, characters, terms, numbers, numerals, or the like. It should be understood, however, that all of these or similar terms are to be associated with appropriate physical quantities and are merely convenient labels. Therefore, unless specifically stated otherwise, terms such as “processing”, “computing”, “calculating”, “determining”, and the like refer to actions or processes of a specific apparatus, such as a special purpose computer or a similar special purpose electronic computing device. A special purpose computer or a similar special purpose electronic computing device is capable of manipulating or transforming signals, typically represented as physical electronic or magnetic quantities within memories, registers, or other information storage devices, transmission devices, or display devices of the special purpose computer or similar special purpose electronic computing device.

System Architecture

FIG. 2 is a block diagram schematically illustrating selected components of an example computer system 100 that can be used to leverage object priors extracted from a large-scale three-dimensional shape database 320 to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene. Computer system 100 may comprise, for example, one or more devices selected from a desktop computer, a laptop computer, a workstation, a tablet computer, a smartphone, a handheld computer, a set-top box, an enterprise class server, or any other such computing device. A combination of different devices may be used in certain embodiments. In general, computer system 100 will be understood as including software configured to implement the various functionalities disclosed herein, as well as hardware that enables such implementation. Examples of enabling hardware include a processor 110, a memory 120, a communication module 150, a local image repository 170, and a bus and/or interconnect 180. Examples of implementing software include an operating system 140 and a visual odometry module 160. In one particular implementation, visual odometry module 160 further comprises a user interface sub-module 161, a stereo matching sub-module 162, an object prior acquisition sub-module 163, a global optimization sub-module 164, and a trajectory smoothening sub-module 165. Depending on the granularity of implementation, computer system 100 may include additional, alternative, or fewer hardware and software components in other embodiments. The present disclosure therefore should not be understood as being limited to the particular architecture and components illustrated in FIG. 2.

FIG. 2 also illustrates that, depending on the particular type of device used for implementation, computer system 100 is optionally coupled to, or otherwise implemented in conjunction with, one or more peripheral hardware components 500. Examples of peripheral hardware components 500 include a display 510, a textual input device 520 (such as a keyboard), and a pointer-based input device 530 (such as a mouse). One or more other input/output devices, such as a touch sensitive display, a speaker, a printer, a printer capable of generating a three-dimensional object (often colloquially referred to as a “3D printer”), or a microphone, can be used in other embodiments. For example, in a particular alternative embodiment wherein computer system 100 is implemented in the form of a tablet computer, certain functionality associated with the particular peripheral hardware components 500 illustrated in FIG. 2 is provided instead by a touch sensitive surface and a camera that form part of the tablet computer. Thus, for example, a tablet computer used to visually scan an object using an integrated camera could also determine a camera trajectory around the scanned object.

In general, computer system 100 may be coupled to a network 300 to allow for communications with other computing devices or resources, such as a networked image repository 310 and the aforementioned three-dimensional shape database 320. Networked image repository 310 can be used to store imagery and/or corresponding estimated camera trajectories 60 as determined using the techniques disclosed herein. Three-dimensional shape database 320 provides a large-scale dataset of three-dimensional shapes, optionally with category and alignment annotations. Another resource which may be accessed via network 300 is a remote image processing server that provides additional computing resources to supplement the capacity of local processor 110. Network 300 may be a local area network (such as a home-based or office network), a wide area network (such as the Internet), a peer-to-peer network (such as a Bluetooth connection), or a combination of such networks, whether public, private, or both. For example, in certain embodiments at least a portion of the functionality associated with network 300 is provided by a cellular data network, thereby making it easier for users of smartphones, tablet computers, and other portable devices to leverage networked resources. In general, it should be appreciated that communications amongst the various entities and resources described herein may occur via wired and/or wireless connections.

Processor 110 can be any suitable processor, and may include one or more coprocessors or controllers, such as an audio processor or a graphics processing unit, to assist in control and processing operations associated with computer system 100. Memory 120 can be implemented using any suitable type of digital storage, such as one or more of a disc drive, a flash memory device, or a random access memory device. In certain embodiments memory 120 is used to store instructions that, when executed using processor 110, cause operations associated with visual odometry module 160 and/or one of its constituent sub-modules to be invoked. In some cases memory 120 hosts local image repository 170, which can be used to store source imagery and/or corresponding estimated camera trajectories 60 as determined using the techniques disclosed herein. Communication module 150 can be any appropriate network chip or chipset which allows for wired or wireless connection to other components of computer system 100, to peripheral hardware components 500 (if any), and to network 300, thereby enabling computer system 100 to communicate with other local and remote computer systems, services, and resources, examples of which include networked image repository 310 and three-dimensional shape database 320. Bus and/or interconnect 180 allows for inter- and intra-device communications using communication module 150.

Operating system 140 may comprise any suitable operating system, such as Android™ (Google Inc., Mountain View, Calif.), Windows® (Microsoft Corp., Redmond, Wash.), or OS X® (Apple Inc., Cupertino, Calif.). As will be appreciated in light of this disclosure, the techniques provided herein can be implemented without regard to the particular operating system provided in conjunction with computer system 100, and therefore may also be implemented using any suitable existing or subsequently developed platform. Visual odometry module 160 is capable of using object priors extracted from a large-scale three-dimensional shape database 320 to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene. Such functionality can be implemented in conjunction with a wide range of existing or subsequently developed visual effects software applications, one example of which is After Effects® (Adobe Systems Incorporated, San Jose, Calif.). In the example embodiment illustrated in FIG. 2, visual odometry module 160 comprises user interface sub-module 161, stereo matching sub-module 162, object prior acquisition sub-module 163, global optimization sub-module 164, and trajectory smoothening sub-module 165. In certain embodiments visual odometry module 160 and its sub-modules are implemented by a non-transitory computer readable medium and one or more processors (such as processor 110) of a computing apparatus (such as computer system 100). The computer readable medium may store program instructions executable by the one or more processors to cause the computing apparatus to perform one or more of the techniques described herein. Other embodiments of visual odometry module 160 may be at least partially implemented by hardware circuitry and/or firmware stored, for example, in a nonvolatile memory resource.

In certain embodiments, user interface sub-module 161 comprises instructions encoded on a computer readable medium that, when executed using processor 110, cause a user interface to be generated. In one embodiment, the generated user interface enables a user to identify source imagery that forms the basis for a visual odometry technique, as will be described in turn. This can be accomplished by allowing the user to identify source imagery stored in local image repository 170, or alternatively, by allowing the user to access networked source imagery, for example as may be stored in networked image repository 310, or as may be retrieved from the Internet using a search engine. Likewise, in terms of output, the generated user interface may also be used to view, manipulate, and save any number of estimated camera trajectories determined using the techniques disclosed herein. In some cases the user interface can simultaneously display source imagery and an estimated camera trajectory over the source imagery. The user interface is also optionally configured to display a graph of predicted camera angles as a function of frame number, as illustrated in FIG. 5 as will be described in turn. In certain embodiments user interface sub-module 161 provides file browsing functionality to facilitate the retrieval and storage of a wide range of digital assets. Beyond this, the generated user interface may also be used to manipulate the visual odometry technique itself, for example by adjusting odometry parameters and identifying external resources which are to be leveraged, such as a preferred three-dimensional shape database.

In certain embodiments, stereo matching sub-module 162 comprises instructions encoded on a computer readable medium that, when executed using processor 110, estimate rotations R_(ij) and translations t_(ij) between an ith camera position and a jth camera position with respect to a three-dimensional world coordinate system W ∈

³, as illustrated in FIG. 4. In certain embodiments, such rotations and translations can be estimated by computing per-frame object orientations and positions in the camera coordinate system. Then, to generate world coordinate camera positions, pairs of these estimates are used to constrain the relative rotations and translations of objects. For example, let

={I₁, I₂, I₃, . . . ,

} to be a set of images taken from a three-dimensional world W ∈

³, with camera C_(i) for each image I_(i). Let R_(i) ∈ so(3) and t_(i) ∈

³ be the rotation and translation, respectively, of camera C_(i) with respect to the world coordinate system. In this context, stereo matching sub-module 162 can be configured to estimate rotations R_(i) and translations t, with respect to the world coordinate system. Here the indices i and j are used to indicate local coordinates of two different cameras, while the terms “orientation” and “rotation” are used interchangeably.

For image pair {I_(i), I_(j)} where I_(i) 531

and I_(j) ∈

, let R_(ij) ∈ so(3) be the relative rotation between images I_(i) and I_(j). Here C_(i) ∈

³ is the position of camera C_(i) in W. Let the unit vector

$\begin{matrix} {{\overset{\_}{t}}_{ij}^{i} = \frac{t_{ij}^{i}}{t_{ij}^{i}}} & (1) \end{matrix}$

be the translation direction with respect to C_(i). In certain embodiments stereo matching sub-module 162 uses feature point correspondences to calculate epipolar geometries between two images, including relative pairwise rotation R_(ij) and the translation direction t _(ij) ^(i) with respect to the ith camera coordinates. These describe a transformation between two adjacent camera poses. As mentioned previously, the term “camera pose” encompasses both a camera position (describing where the camera is located) and a camera orientation (describing where the camera is pointed). If the estimations are perfect, they satisfy the conditions

R_(ij)=R_(j)R_(i) ^(T)   (2)

and

$\begin{matrix} {{R_{i}^{T}{\overset{\_}{t}}_{ij}^{i}} = {\frac{t_{j} - t_{i}}{{{t_{j} - t_{i}}}_{2}}.}} & (3) \end{matrix}$

In implementations where there are multiple camera pairs from which epipolar geometries can be obtained, a stereo matching energy function is formulated to aggregate all of the pairwise information by reducing or minimizing the difference between the measurements and the predicted global camera positions. Based on given distance metrics d₁: SO3×SO3→

and d₂: S²×S²→

, stereo matching sub-module 162 can be configured to determine the rotation and translation components of the stereo matching energy function as:

$\begin{matrix} {{E_{R} = {\sum\limits_{({i,j})}{d_{1}\left( {R_{ij},{R_{j}R_{i}^{T}}} \right)}}}{and}} & (4) \\ {{E_{t} = {\sum\limits_{({i,j})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{ij}^{i}},\frac{t_{j} - t_{i}}{{{t_{j} - t_{i}}}_{2}}} \right)}}},} & (5) \end{matrix}$

respectively. In such implementations stereo matching sub-module 162 minimizes these energy functions in two separate computations for rotation and translation. In general, any suitable technique can be used to minimize the stereo matching energy functions provided in Equations (4) and (5). In some cases, such techniques may be referred to as “optimization”, and may be understood as producing a solution that reduces a particular energy term given one or more constraints. More specifically, reducing or minimizing the energy terms provided in Equations (4) and (5) can be understood as finding a solution that closely represents estimated camera poses as defined by the rotation and translation components. In one implementation, stereo matching sub-module 162 minimizes the L1 norm in the Lie algebraic space to solve the rotation component, as disclosed by Chatterjee et al., “Efficient and Robust Large-Scale Rotation Averaging”, Proceedings of the 2013 IEEE International Conference on Computer Vision and Pattern Recognition, pp. 521-528 (2013). In one implementation stereo matching sub-module 162 solves the translation component using a nonlinear least squares minimizing squared chordal distance, as described by Wilson et al., “Robust Global Translations with 1DSfM”, Computer Vision—ECCV 2014, Springer International Publishing, pp. 61-75 (2014).

In certain embodiments, object prior acquisition sub-module 163 comprises instructions encoded on a computer readable medium that, when executed using processor 110, detect object locations and estimate three-dimensional object orientations. The detected object locations in a given image are defined by two-dimensional bounding boxes 163 a that can be calculated using any suitable shape detection technique. For example, in one embodiment object prior acquisition sub-module 163 detects the object locations using the “Faster R-CNN” technique described by Ren et al., “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks”, arXiv preprint arXiv:1506.01497v3 (6 Jan. 2016).

Three dimensional camera directions 163 b can be estimated based on three-dimensional shape database 320 which contains three-dimensional models and objects from known object classes. For example, in one embodiment object prior acquisition sub-module 163 estimates three-dimensional object orientations using the “Render for CNN” technique described by Su et al., “Render for CNN: Viewpoint Estimation in Images Using CNNs Trained with Rendered 3D Model Views”, arXiv preprint arXiv:1505.05641v1 (21 May 2015). In such embodiments three-dimensional shape database 320 is provided by ShapeNet (available at shapenet.org), which is a richly-annotated, large-scale dataset of three-dimensional shapes with random background. Three-dimensional shape database 320 provides a known structure for an entire class of shapes, thereby allowing orientations to be predicted with greater accuracy. Using random backgrounds enables object prior acquisition sub-module 163 to work with object classes rather than specific object instances. Notably, the acquired object prior need not be the same as the object appearing in the source imagery. In many cases, an object prior that is simply in the same object class as the imaged object will have a sufficiently large number of common features to allow the orientation of the imaged object to be predicted accurately.

In one embodiment three-dimensional camera directions are estimated by projecting centers of the aforementioned bounding boxes and then calculating a translation direction t _(iα) ^(i) by shooting a ray from the camera to the bounding box center. Other orientation techniques can be used in other embodiments, including subsequently developed techniques for detecting objects using neural networks. Estimating object orientations based on the three-dimensional shape database 320 allows additional objects with known three-dimensional structure to be analyzed in related images, thereby enhancing existing SFM techniques. The result of applying the Faster R-CNN and Render for CNN techniques is a per-object bounding box and probability distribution over a range of Euler angles for each input image.

Even where a sequence of video frames is analyzed, objects are still detected in each frame separately. In this case, multiple object-camera constraints for a particular tracked object 163 c can be connected with a single object pose variable if common object instances are identified across frames. For example, Faster R-CNN identifies object class, but there still may be multiple objects of the same class in a given scene. Therefore in certain embodiments object prior acquisition sub-module 163 is further configured to track objects using a Kalman filter on two-dimensional bounding box centers and scales. One way of doing this is using the “SORT” technique described by Bewley et al., “Simple Online and Realtime Tracking”, arXiv preprint arXiv:1602.00763v1 (2 Feb. 2015). This allows a constraint to be introduced that requires only the same class objects to belong to a particular object instance. An aspect ratio can be used in the Kalman filter to smooth the estimated two-dimensional bounding boxes 163 a over time. In general, tracking a particular object over a longer sequence of frames results in a more accurate object prior for subsequent global optimization calculations.

In certain embodiments, object prior acquisition sub-module 163 also identifies object-to-object correspondences based on point-wise feature matches in the identified object priors. For example, in a given frame

, let

={

₁,

₂,

₃, . . . ,

_(|)

_(|)} be a set of objects that are detected in

. For the acquired object priors, let R_(αi) be the rotation from object O_(α) to camera C_(i) provided that O_(α) is detected in I_(i). Further, let t _(iα) ^(i) be the camera-to-object translation direction from C_(i) to O_(α). For all objects detected in the two-dimensional scene, additional variables for object rotations R_(α) and translations t_(α) in world space can be added. The relative camera poses transforming a particular detected object are given by

R_(αi)=R_(i)R_(α) ^(T)   (6)

and

$\begin{matrix} {{R_{i}^{T}{\overset{\_}{t}}_{i\; \alpha}^{i}} = {\frac{t_{\alpha} - t_{i}}{{{t_{\alpha} - t_{i}}}_{2}}.}} & (7) \end{matrix}$

An object prior energy function can be formulated to aggregate all of the pairwise information by reducing or minimizing the difference between the measurements and the predicted global camera positions. Based on the aforementioned distance metrics d₁: SO3×SO3→

and d₂: S²×S²→

, object prior acquisition sub-module 163 can be configured to determine the rotation and translation components of the object prior energy function as:

$\begin{matrix} {{E_{R} = {\sum\limits_{({\alpha,i})}{d_{1}\left( {R_{\alpha \; i},{R_{i}R_{\alpha}^{T}}} \right)}}}{and}} & (8) \\ {{E_{t} = {\sum\limits_{({\alpha,i})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{i\; \alpha}^{i}},\frac{t_{\alpha} - t_{i}}{{{t_{\alpha} - t_{i}}}_{2}}} \right)}}},} & (9) \end{matrix}$

respectively. In such implementations object prior acquisition sub-module 163 minimizes these energy functions in two separate computations for rotation and translation. Reducing or minimizing the energy terms provided in Equations (8) and (9) can be understood as finding a solution that closely represents estimated camera positions as defined by the rotation and translation components. As noted above, any suitable technique can be used to minimize the object prior energy functions provided in Equations (8) and (9), including the aforementioned techniques described by Chatterjee et al., and Wilson et al.

In certain embodiments global optimization sub-module 164 comprises instructions encoded on a computer readable medium that, when executed using processor 110, integrate the stereo matching energy functions provided in Equations (4) and (5) with the object prior energy functions provided in Equations (8), and (9). The integrated energy functions are then minimized. The result, for rotation and translation, is

$\begin{matrix} {\mspace{79mu} {\min\limits_{({R_{i},R_{\alpha}})}{\left\lbrack {{\sum\limits_{({i,j})}{d_{1}\left( {R_{ij},{R_{j}R_{i}^{T}}} \right)}} + {\sigma_{R}{\sum\limits_{({\alpha,i})}{d_{1}\left( {R_{\alpha \; i},{R_{i}R_{\alpha}^{T}}} \right)}}}} \right\rbrack \mspace{14mu} {and}}}} & (10) \\ {{\min\limits_{({t_{i},t_{\alpha}})}\left\lbrack {{\sum\limits_{({i,j})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{ij}^{i}},\frac{t_{j} - t_{i}}{{{t_{j} - t_{i}}}_{2}}} \right)}} + {\sigma_{T}{\sum\limits_{({\alpha,i})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{i\; \alpha}^{i}},\frac{t_{\alpha} - t_{i}}{{{t_{\alpha} - t_{i}}}_{2}}} \right)}}}} \right\rbrack},} & (11) \end{matrix}$

respectively. Here σ_(R) and σ_(T) are energy term weights for rotation and translation, respectively. Reducing or minimizing the values provided by these integrated energy functions will produce per-frame rotations and translations that define camera poses that are predicted for image pairs based on feature matches (from stereo matching sub-module 162) and predicted object orientations (from object prior acquisition sub-module 163). Because Equations (10) and (11) have the same form as the pairwise camera terms, they can be solved using the same techniques (see, for example, Chatterjee et al., and Wilson et al.). Reducing or minimizing the values provided by the integrated energy functions provided in Equations (10) and (11) allows per-object predicted rotations and translations to be included in existing SFM techniques, thus enabling camera poses and camera trajectories to be predicted with greater accuracy.

In certain embodiments trajectory smoothening sub-module 165 comprises instructions encoded on a computer readable medium that, when executed using processor 110, determine a smoothened path of transformations corresponding to camera motion in a video recording. This smoothened path is based on the predicted camera poses generated by global optimization sub-module 164, as described above. More specifically, global optimization sub-module 164 predicts camera poses as a classification in terms of azimuthal, elevational, and in-plane (θ) rotation, and further generates confidence values for each of these dimensions. When the input imagery comprises a video recording, a temporal continuity is optionally enforced on the predictions. Considering temporal continuity thus provides high-probability camera pose estimates that are consistent not only with stereo matching techniques and acquired object priors, but also with neighboring frames in the video recording.

Based on the foregoing, for a given time sequence associated with source imagery, trajectory smoothening sub-module 165 comprises dynamic programming that selects angle samples for each frame. Let p(f, s) denote the obtained probability of angle sample s at frame f, and let α(f, s) denote an accumulated score for angle sample s at frame! At the first analyzed frame f=1 and α(f, s)=p(f, s). For the next frame α(f, s) can be computed as

$\begin{matrix} {{{a\left( {f,s} \right)} = {{p\left( {f,s} \right)} + {\min\limits_{s^{\prime} \in {N{(s)}}}\left\{ {{a\left( {{f - 1},s^{\prime}} \right)} + {w{{s - s^{\prime}}}_{2}^{2}}} \right\}}}},} & (12) \end{matrix}$

where N(s) is a circular range of neighbors around angle s and w is a small weight that penalizes large-angle movements. The chosen angle s′ is identified, and after all frames have been processed, the angle sample s with the highest score α(f, s) can be identified. Angle samples can then be backtracked to the first frame. This allows consistent predictions to be made across frames. In certain embodiments the dynamic programming provided by trajectory smoothening sub-module 165 is separately performed for azimuthal, elevational, and in-plane (θ) rotation.

For example, FIG. 5 comprises three graphs illustrating a predicted camera angle as calculated by trajectory smoothening sub-module 165 for azimuthal, elevational, and in-plane (θ) rotation as a function of frame number in a video of an example three-dimensional scene. The accumulated score α(f, s) for a given frame is indicated by shading, with higher shading indicating higher accumulated scores, and thus a higher likelihood predicted angle. The cyclical nature of the projected azimuthal angle combined with the relatively constant projected angle for elevational and in-plane (θ) rotation indicates a camera rotating around an object with constant elevation and in-plane (θ) position. In some implementations user interface sub-module 161 is configured to display a graph of predicted camera angle as a function of frame number, as illustrated in FIG. 5.

FIG. 6 is a table comparing estimated camera trajectories calculated with and without the use of object priors extracted from a large-scale three-dimensional shape database. An example smoothened camera trajectory associated with the camera rotation of FIG. 5 is illustrated in the right column of FIG. 6. In contrast, the left column of FIG. 6 illustrates an estimated camera trajectory calculated using existing techniques, that is, without the benefit of object priors acquired from three-dimensional shape database 320. As can be seen, the trajectories calculated using existing techniques have more discontinuities and are less refined than the trajectories calculated using object priors. Thus it can be seen that incorporating object priors as described herein provides a more refined solution and a more accurate starting point for subsequent visual odometry processing, such as bundle adjustment.

The embodiments described herein can be implemented in various forms of hardware, software, firmware, or special purpose processors. For example, in one embodiment a non-transitory computer readable medium has instructions encoded thereon that, when executed by one or more processors, cause aspects of the visual odometry techniques 1000 disclosed herein to be implemented. The instructions can be encoded using any suitable programming language, such as C, C++, object-oriented C, Java, JavaScript, Visual Basic .NET, BASIC, Scala, or alternatively, using custom or proprietary instruction sets. Such instructions can be provided in the form of one or more computer software applications or applets that are tangibly embodied on a memory device, and that can be executed by a computer having any suitable architecture. In one embodiment the system can be hosted on a given website and implemented, for example, using JavaScript or another suitable browser-based technology.

The functionalities disclosed herein can optionally be incorporated into a variety of different software applications, including image editing software applications, desktop publishing applications, computer-aided design applications, presentation applications, word processing applications, animation applications, or video editing applications. For example, a video editing application can be configured to estimate the trajectory of a camera used to generate a video, and then use those estimations to manipulate CGI that is embedded in the video. More generally, it should be appreciated that computationally efficient and accurate visual odometry algorithms can be used in a wide range of applications including three-dimensional image-based modeling and rendering, video stabilization, panorama stitching, video augmentation, vision-based robot navigation, and human-computer interaction. As illustrated in FIG. 2, the computer software applications disclosed herein may include a number of different modules, sub-modules, or other components of distinct functionality, and can provide input to, or receive information from, still other components and services. These modules can be used, for example, to communicate with input/output devices such as a display screen, a touch sensitive surface, a printer, or any other suitable input/output device. Other components and functionality not reflected in the illustrations will be apparent in light of this disclosure, and it will be appreciated that the present disclosure is not intended to be limited to any particular hardware or software configuration. Thus in other embodiments the components illustrated in FIG. 2 may include additional, fewer, or other subcomponents.

The aforementioned non-transitory computer readable medium may be any suitable medium for storing digital information, such as a hard drive, a server, a flash memory, random access memory, or any suitable combination of the foregoing. In alternative embodiments, the computers and modules disclosed herein can be implemented with hardware, including gate level logic such as a field-programmable gate array (FPGA), or alternatively, a purpose-built semiconductor such as an application-specific integrated circuit (ASIC). Still other embodiments may be implemented with a microcontroller having a number of input/output ports for receiving and outputting data, and an number of embedded routines or carrying out the various functionalities disclosed herein. It will be apparent that any suitable combination of hardware, software, and firmware can be used in this regard, and that the present disclosure is not intended to be limited to any particular system architecture.

Methodology

FIGS. 3A and 3B comprise a flowchart illustrating an example technique 1000 for using object priors extracted from a large-scale three-dimensional shape database to more accurately estimate the pose of a camera that was used to capture a three-dimensional scene. As can be seen, technique 1000 includes a number of phases and sub-processes, the sequence of which may vary from one embodiment to another. However, when considered in the aggregate, these phases and sub-processes form part of a visual odometry framework that leverages three-dimensional object priors extracted from a large-scale shape database to more accurately estimate a camera trajectory. Technique 1000, which in certain embodiments is responsive to user input as described herein, can be implemented using computer system 100 illustrated in FIG. 2. However other system architectures can be used in other embodiments, as will be apparent in light of this disclosure. To this end, the correlation of the various functionalities illustrated in FIGS. 3A and 3B to the components illustrated in FIG. 2 is not intended to imply any structural or use limitations. Rather, other embodiments may include, for example, varying degrees of integration wherein multiple functionalities are effectively performed by one resource or component. For example, in an alternative embodiment global optimization sub-module 164 is capable of performing stereo matching between images and acquiring object priors, thereby allowing stereo matching sub-module 162 and object prior acquisition sub-module 163 to be omitted. Other embodiments may therefore have fewer or more components depending on the granularity of implementation. Numerous variations and alternative configurations will be apparent in light of this disclosure.

Method 1000 commences with acquisition of source imagery 20. Source imagery 20 can be acquired in any number of ways, including by actively recording a three-dimensional scene using a video camera, by snapping photographs of a three-dimensional scene using a still camera, or by acquiring photographs from a digital repository, regardless of whether such repository is private (for example, an electronic folder stored on a user's personal thumb drive) or freely accessible (for example, the Google Images search service). The imagery need not have been acquired using the same recording equipment or even in the same recording session. The source imagery 20 can be understood as comprising a collection of unorganized still images 22, a sequence of video frames 24, or some combination thereof.

Once acquired, source imagery 20 is passed to stereo matching sub-module 162 and object prior acquisition sub-module 163. The analysis provided by these sub-modules can be performed simultaneously or sequentially in any suitable order. As described herein, stereo matching sub-module 162 invokes a stereo matching process 1100 that uses pairwise feature matching in the acquired imagery to estimate a rotation component 1100 r and a translation component 1100 t of motion between adjacent ith and jth camera positions. This can be accomplished using the techniques disclosed herein, and the results can be represented by the stereo matching energy functions provided in Equations (4) and (5) for the rotation and translation components, respectively. Likewise, object prior acquisition sub-module 163 invokes an object prior acquisition process 1200 that leverages object priors acquired from three-dimensional shape database 320 to estimate a rotation component 1200 r and a translation component 1200 t between an ith camera position and object coordinates for an αth detected object. The results can be represented by the object prior energy functions provided in Equations (8) and (9) for the rotation and translation components, respectively. In certain embodiments object prior acquisition process 1200 comprises detecting bounding boxes using the Faster R-CNN technique disclosed by Ren et al. See reference numeral 1210 in FIG. 3A. In such embodiments object prior acquisition process 1200 further comprises estimating three-dimensional camera directions (with respect to the detected objects) using the Render for CNN technique disclosed by Su et al. See reference numeral 1220 in FIG. 3A. The camera directions can be derived based on object priors in three-dimensional shape database 320. Optionally, in cases where a sequence of video frames is analyzed, objects can be traced across frames using the SORT technique disclosed by Bewley et al. See reference numeral 1230 in FIG. 3A.

Global optimization sub-module 164 invokes a global optimization process 1400 that integrates the energy functions provided in Equations (4), (5), (8), and (9). The result of this combination is a composite rotation component 1400 r and a composite translation component 1400 t, which can be minimized, as represented by Equations (10) and (11). These components can be expressed in terms of azimuthal, elevation, and in-plane (θ) rotation. The significance of the contribution from acquired object priors can be manipulated using the energy term weights σ_(R) and σ^(T) for rotation and translation, respectively. The composite rotation component 1400 r and the composite translation component 1400 t can be aggregated to define estimated camera trajectory 60, which can be displayed using user interface sub-module 161. In certain embodiments trajectory smoothening sub-module 165 invokes an optional trajectory smoothening process 1500 that determines a smoothened path of transformations corresponding to camera motion in a video recording. In such embodiments trajectory smoothening sub-module 165 enforces a temporal continuity on the predictions for azimuthal rotation 1510, elevation rotation 1520, and in-plane (θ) rotation 1530 that are generated by global optimization sub-module 164. As illustrated in FIG. 5, this allows consistent rotation predictions to be made across frames of a video recording. The result is a smoothened camera trajectory 60′ that can be displayed using user interface sub-module 161.

As noted above, leveraging object priors from three-dimensional shape database 320 allows additional objects with known three-dimensional structure to be analyzed in related images, thereby enhancing existing SFM techniques which rely on stereo matching alone. In particular, three-dimensional shape database 320 provides a known three-dimensional structure for an entire class of shapes, thereby allowing object orientations to be predicted with greater accuracy. This is clearly illustrated in FIG. 6, which provides a comparison of estimated camera trajectories calculated with (right column) and without (left column) the use of object priors extracted from a large-scale three-dimensional shape database. In particular, FIG. 6 makes clear that the trajectories calculated using existing techniques have more discontinuities and are less refined than the trajectories calculated using object priors.

Further Example Embodiments

Numerous variations and configurations will be apparent in light of this disclosure. For example, one example embodiment provides a visual odometry method. The method comprises receiving source imagery that comprises a plurality of two-dimensional images of a three-dimensional scene. Each of the two-dimensional images was captured from a corresponding camera pose. The method further comprises estimating a camera trajectory in the three-dimensional scene. The camera trajectory represents the plurality of camera poses from which the corresponding plurality of two-dimensional images were captured. The camera trajectory is estimated based on both (a) feature point correspondences detected in a pair of the two-dimensional images, and (b) an object prior derived from a three-dimensional shape database and the source imagery. The object prior represents a three-dimensional shape of an object detected in at least some of the source imagery. In certain implementations the source imagery comprises a monocular video recording having a plurality of frames, each of which corresponds to one of the two-dimensional images. In certain implementations estimating the camera trajectory further comprises (a) estimating first rotation and first translation components of camera motion between a pair of the camera poses based on the feature point correspondences; and (b) estimating second rotation and second translation components of the camera motion between the pair of camera poses using the object prior. In certain embodiments estimating the camera trajectory further comprises (a) estimating first rotation and first translation components of camera motion between a pair of the camera poses based on the feature point correspondences; (b) estimating second rotation and second translation components of the camera motion between the pair of camera poses using the object prior; and (c) minimizing a sum of the first and second rotation components using Equation (10); wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some of the source imagery; wherein a represents an αth object detected in at least some of the source imagery; wherein R_(i) and R_(j) represent rotation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein R_(ij) represents relative camera rotation between the ith and jth camera poses based on the feature point correspondences; wherein R_(α) represents rotation of the αth object with respect to the world coordinate system w; wherein R_(αi) represents relative rotation of the αth object with respect to the ith camera pose; wherein d₁ is a distance metric SO3×SO3→

; and wherein σ_(R) is a rotation energy term weight. In certain embodiments estimating the camera trajectory further comprises (a) estimating first rotation and first translation components of camera motion between a pair of the camera poses based on the feature point correspondences; (b) estimating second rotation and second translation components of the camera motion between the pair of camera poses using the object prior; and (c) minimizing a sum of the first and second translation components using Equation (11); wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some embodiments of the source imagery; wherein α represents an αth object detected in at least some of the source imagery; wherein t_(i) and t_(i) represent translation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein t_(ij) represents relative camera translation between the ith and jth camera poses based on the feature point correspondences; wherein t_(α) represents translation of the αth object with respect to the world coordinate system w; wherein t_(αi) represents relative translation of the αth object with respect to the ith camera pose; wherein d₂ is a distance metric S²×S²→

; and wherein σ^(T) is a translation energy term weight. In certain embodiments the method further comprises causing a visual representation of the estimated camera trajectory to be displayed. In certain embodiments the method further comprises (a) defining a two-dimensional bounding box around the object detected in at least some of the source imagery; and (b) estimating a three-dimensional camera direction for a particular two-dimensional image containing the detected object, the camera direction being estimated by projecting a center of the bounding box and calculating a translation direction defined by a ray extending from a camera location associated with the particular two-dimensional image to the bounding box center. In certain embodiments the method further comprises defining a two-dimensional bounding box around the object detected in at least some of the source imagery; and using the object prior to estimate a three-dimensional camera direction for a particular two-dimensional image containing the detected object. In certain embodiments the method further comprises (a) defining a two-dimensional bounding box around the object detected in at least some of the source imagery; and (b) tracking the detected object across at least a portion of the two-dimensional images using a Kalman filter applied to the two-dimensional bounding box.

Another example embodiment provides a visual odometry system that comprises a processor, a display device coupled to the processor, and a memory coupled to the processor. The memory has stored therein source imagery that comprises a plurality of two-dimensional images of a three-dimensional scene. Each of the two-dimensional images was captured from a corresponding camera pose. The system further comprises a stereo matching sub-module that is stored in the memory. The stereo matching sub-module comprises means for estimating rotation and translation components of camera motion between a pair of the camera poses based on feature point correspondences detected in a pair of the two-dimensional images corresponding to the pair of camera poses. The system further comprises an object prior acquisition sub-module that is stored in the memory. The object prior acquisition sub-module comprises means for estimating rotation and translation components of the camera motion between the pair of camera poses based on an object prior derived from a three-dimensional shape database. The derived object prior represents a three-dimensional shape of an object detected in at least some of the source imagery. The system further comprises a global optimization sub-module that is stored in the memory, the global optimization sub-module comprising means for estimating a camera trajectory in the three-dimensional scene based on (a) the rotation and translation components estimated by the stereo matching sub-module and (b) the rotation and translation components estimated by the object prior acquisition sub-module. In certain embodiments the three-dimensional shape database includes a plurality of annotated three-dimensional models. In certain embodiments the system further comprises further comprising a trajectory smoothening sub-module comprising means for calculating an accumulated score α(f, s) for an angle sample s at a particular two-dimensional source image f, wherein

${{a\left( {f,s} \right)} = {{p\left( {f,s} \right)} + {\min\limits_{s^{\prime} \in {N{(s)}}}\left\{ {{a\left( {{f - 1},s^{\prime}} \right)} + {w{{s - s^{\prime}}}_{2}^{2}}} \right\}}}};$

wherein N(s) is a range of angles neighboring the angle sample s; and wherein w is a weight that penalizes large-angle movements within the range N(s). In certain embodiments the object prior acquisition sub-module further comprises means for tracking the detected object across at least some of the two-dimensional images using a Kalman filter. In certain embodiments the system further comprises a user interface sub-module that is stored in the memory, the user interface sub-module comprising means for causing the estimated camera trajectory to be displayed on the display device.

Another example embodiment provides a non-transitory computer readable medium encoded with instructions that, when executed by one or more processors, causes a visual odometry process to be invoked. The process comprises receiving source imagery that comprises a plurality of two-dimensional images of a three-dimensional scene. Each of the two-dimensional images was captured from a corresponding camera pose. The process further comprises estimating first rotation and first translation components of camera motion between a pair of the camera poses by identifying feature point correspondences in a pair of the two-dimensional images corresponding to the pair of camera poses. The process further comprises estimating second rotation and second translation components of the camera motion between the pair of camera poses using a three-dimensional shape that is derived from a shape database, and that represents an object detected in at least some of the source imagery. The process further comprises minimizing a rotation sum of the first and second rotation components over a plurality of pairwise transformations between camera poses corresponding to at least some of the two-dimensional images. The process further comprises minimizing a translation sum of the first and second translation components over the plurality of pairwise transformations. The process further comprises estimating a camera trajectory that represents the plurality of camera poses from which the corresponding plurality of two-dimensional images were captured. The camera trajectory is defined by a sequence of transformations that establish the minimized rotation and translation sums. In certain embodiments minimizing the rotation sum is given by Equation (10); wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some of the source imagery; wherein a represents an αth object detected in at least some of the source imagery; wherein R_(i) and R_(j) represent rotation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein R_(ij) represents relative camera rotation between the ith and jth camera poses based on the feature point correspondences; wherein R_(α) represents rotation of the αth object with respect to the world coordinate system w; wherein R_(αi), represents relative rotation of the αth object with respect to the ith camera pose; wherein d₁ is a distance metric SO3×SO3→

; and wherein σ_(R) is a rotation energy term weight. In certain embodiments minimizing the translation sum is given by Equation (11); wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some embodiments of the source imagery; wherein α represents an αth object detected in at least some of the source imagery; wherein t_(i) and t_(j) represent translation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein t_(ij) represents relative camera translation between the ith and jth camera poses based on the feature point correspondences; wherein t_(α) represents translation of the αth object with respect to the world coordinate system w; wherein t_(αi) represents relative translation of the αth object with respect to the ith camera pose; wherein d₂ is a distance metric S²×S²→

; and wherein σ_(T) is a translation energy term weight. In certain embodiments the process further comprises causing a visual representation of the estimated camera trajectory to be displayed on a display device coupled to the one or more processors. In certain embodiments he source imagery comprises a video recording that includes a plurality of sequential video frames. In certain embodiments the source imagery comprises a plurality of unorganized still images.

The foregoing disclosure has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to be limited to the particular described embodiments. Many modifications and variations are possible. It is therefore intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto. 

What is claimed is:
 1. A visual odometry method comprising: receiving source imagery that comprises a plurality of two-dimensional images of a three-dimensional scene, wherein each of the two-dimensional images was captured from a corresponding camera pose; and estimating a camera trajectory in the three-dimensional scene, the camera trajectory representing the plurality of camera poses from which the corresponding plurality of two-dimensional images were captured, wherein the camera trajectory is estimated based on both (a) feature point correspondences detected in a pair of the two-dimensional images, and (b) an object prior derived from a three-dimensional shape database and the source imagery; wherein the object prior represents a three-dimensional shape of an object detected in at least some of the source imagery.
 2. The visual odometry method of claim 1, wherein the source imagery comprises a monocular video recording having a plurality of frames, each of which corresponds to one of the two-dimensional images.
 3. The visual odometry method of claim 1, wherein estimating the camera trajectory further comprises: estimating first rotation and first translation components of camera motion between a pair of the camera poses based on the feature point correspondences; and estimating second rotation and second translation components of the camera motion between the pair of camera poses using the object prior.
 4. The visual odometry method of claim 1, wherein estimating the camera trajectory further comprises: estimating first rotation and first translation components of camera motion between a pair of the camera poses based on the feature point correspondences; estimating second rotation and second translation components of the camera motion between the pair of camera poses using the object prior; and minimizing a sum of the first and second rotation components by calculating ${\min\limits_{({R_{i},R_{\alpha}})}\left\lbrack {{\sum\limits_{({i,j})}{d_{1}\left( {R_{ij},{R_{j}R_{i}^{T}}} \right)}} + {\sigma_{R}{\sum\limits_{({\alpha,i})}{d_{1}\left( {R_{\alpha \; i},{R_{i}R_{\alpha}^{T}}} \right)}}}} \right\rbrack};$ wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some of the source imagery; wherein α represents an αth object detected in at least some of the source imagery; wherein R_(i) and R_(J) represent rotation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein R_(ij) represents relative camera rotation between the ith and jth camera poses based on the feature point correspondences; wherein R_(α) represents rotation of the αth object with respect to the world coordinate system w; wherein R_(αi) represents relative rotation of the αth object with respect to the ith camera pose; wherein d₁ is a distance metric SO3×SO3→

; and wherein σ_(R) is a rotation energy term weight.
 5. The visual odometry method of claim 1, wherein estimating the camera trajectory further comprises: estimating first rotation and first translation components of camera motion between a pair of the camera poses based on the feature point correspondences; estimating second rotation and second translation components of the camera motion between the pair of camera poses using the object prior; and minimizing a sum of the first and second translation components by calculating ${\min\limits_{({t_{i},t_{\alpha}})}\left\lbrack {{\sum\limits_{({i,j})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{ij}^{i}},\frac{t_{j} - t_{i}}{{{t_{j} - t_{i}}}_{2}}} \right)}} + {\sigma_{T}{\sum\limits_{({\alpha,i})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{i\; \alpha}^{i}},\frac{t_{\alpha} - t_{i}}{{{t_{\alpha} - t_{i}}}_{2}}} \right)}}}} \right\rbrack};$ wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some embodiments of the source imagery; wherein α represents an αth object detected in at least some of the source imagery; wherein t_(i) and t_(j) represent translation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; 1 ^(1:) wherein t_(ij) represents relative camera translation between the ith and jth camera poses based on the feature point correspondences; wherein t_(α) represents translation of the αth object with respect to the world coordinate system w; wherein t_(αi) represents relative translation of the αth object with respect to the ith camera pose; wherein d₂ is a distance metric S²×S²→

; and wherein σ_(T) is a translation energy term weight.
 6. The visual odometry method of claim 1, the method further comprising causing a visual representation of the estimated camera trajectory to be displayed.
 7. The visual odometry method of claim 1, further comprising: defining a two-dimensional bounding box around the object detected in at least some of the source imagery; and estimating a three-dimensional camera direction for a particular two-dimensional image containing the detected object, the camera direction being estimated by projecting a center of the bounding box and calculating a translation direction defined by a ray extending from a camera location associated with the particular two-dimensional image to the bounding box center.
 8. The visual odometry method of claim 1, further comprising: defining a two-dimensional bounding box around the object detected in at least some of the source imagery; and using the object prior to estimate a three-dimensional camera direction for a particular two-dimensional image containing the detected object.
 9. The visual odometry method of claim 1, further comprising: defining a two-dimensional bounding box around the object detected in at least some of the source imagery; and tracking the detected object across at least a portion of the two-dimensional images using a Kalman filter applied to the two-dimensional bounding box.
 10. A visual odometry system comprising: a processor; a display device coupled to the processor; a memory coupled to the processor, the memory having stored therein source imagery that comprises a plurality of two-dimensional images of a three-dimensional scene, wherein each of the two-dimensional images was captured from a corresponding camera pose; a stereo matching sub-module that is stored in the memory, the stereo matching sub-module comprising means for estimating rotation and translation components of camera motion between a pair of the camera poses based on feature point correspondences detected in a pair of the two-dimensional images corresponding to the pair of camera poses; an object prior acquisition sub-module that is stored in the memory, the object prior acquisition sub-module comprising means for estimating rotation and translation components of the camera motion between the pair of camera poses based on an object prior derived from a three-dimensional shape database, wherein the derived object prior represents a three-dimensional shape of an object detected in at least some of the source imagery; and a global optimization sub-module that is stored in the memory, the global optimization sub-module comprising means for estimating a camera trajectory in the three-dimensional scene based on (a) the rotation and translation components estimated by the stereo matching sub-module and (b) the rotation and translation components estimated by the object prior acquisition sub-module.
 11. The visual odometry system of claim 10, wherein the three-dimensional shape database includes a plurality of annotated three-dimensional models.
 12. The visual odometry system of claim 10, further comprising a trajectory smoothening sub-module comprising means for calculating an accumulated score α(f, s) for an angle sample s at a particular two-dimensional source image f; wherein α(f, s)=p(f, s)+min_(s′∈N(s)){α(f−1,s′)+w∥s−s′∥₂ ²}; wherein N(s) is a range of angles neighboring the angle sample s; and wherein w is a weight that penalizes large-angle movements within the range N(s).
 13. The visual odometry system of claim 10, wherein the object prior acquisition sub-module further comprises means for tracking the detected object across at least some of the two-dimensional images using a Kalman filter.
 14. The visual odometry system of claim 10, further comprising a user interface sub-module that is stored in the memory, the user interface sub-module comprising means for causing the estimated camera trajectory to be displayed on the display device.
 15. A non-transitory computer readable medium encoded with instructions that, when executed by one or more processors, causes a visual odometry process to be invoked, the visual odometry process comprising: receiving source imagery that comprises a plurality of two-dimensional images of a three-dimensional scene, wherein each of the two-dimensional images was captured from a corresponding camera pose; estimating first rotation and first translation components of camera motion between a pair of the camera poses by identifying feature point correspondences in a pair of the two-dimensional images corresponding to the pair of camera poses; estimating second rotation and second translation components of the camera motion between the pair of camera poses using a three-dimensional shape that is derived from a shape database, and that represents an object detected in at least some of the source imagery; minimizing a rotation sum of the first and second rotation components over a plurality of pairwise transformations between camera poses corresponding to at least some of the two-dimensional images; minimizing a translation sum of the first and second translation components over the plurality of pairwise transformations; and estimating a camera trajectory that represents the plurality of camera poses from which the corresponding plurality of two-dimensional images were captured, wherein the camera trajectory is defined by a sequence of transformations that establish the minimized rotation and translation sums.
 16. The non-transitory computer readable medium of claim 15, wherein minimizing the rotation sum is given by ${\min\limits_{({R_{i},R_{\alpha}})}\left\lbrack {{\sum\limits_{({i,j})}{d_{1}\left( {R_{ij},{R_{j}R_{i}^{T}}} \right)}} + {\sigma_{R}{\sum\limits_{({\alpha,i})}{d_{1}\left( {R_{\alpha \; i},{R_{i}R_{\alpha}^{T}}} \right)}}}} \right\rbrack};$ wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some of the source imagery; wherein α represents an αth object detected in at least some of the source imagery; wherein R_(i) and R_(j) represent rotation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein R_(ij) represents relative camera rotation between the ith and jth camera poses based on the identified feature point correspondences; wherein R_(α) represents rotation of the αth object with respect to the world coordinate system w; wherein R_(αi) represents relative rotation of the αth object with respect to the ith camera pose; wherein d₁ is a distance metric SO3×SO3→

; and wherein σ_(R) is a rotation energy term weight.
 17. The non-transitory computer readable medium of claim 15, wherein minimizing the translation sum is given by ${\min\limits_{({t_{i},t_{\alpha}})}\left\lbrack {{\sum\limits_{({i,j})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{ij}^{i}},\frac{t_{j} - t_{i}}{{{t_{j} - t_{i}}}_{2}}} \right)}} + {\sigma_{T}{\sum\limits_{({\alpha,i})}{d_{2}\left( {{R_{i}^{T}{\overset{\_}{t}}_{i\; \alpha}^{i}},\frac{t_{\alpha} - t_{i}}{{{t_{\alpha} - t_{i}}}_{2}}} \right)}}}} \right\rbrack};$ wherein i and j represent ith and jth camera poses, respectively, used to acquire at least some of the source imagery; wherein α represents an αth object detected in at least some of the source imagery; wherein t_(i) and t_(j) represent translation of the ith and jth camera poses, respectively, with respect to a three-dimensional world coordinate system w ∈

³; wherein t_(ij) represents relative camera translation between the ith and jth camera poses based on the identified feature point correspondences; wherein t_(α) represents translation of the αth object with respect to the world coordinate system w; wherein t_(αi) represents relative translation of the αth object with respect to the ith camera pose; wherein d₂ is a distance metric S²×S²→

; and wherein σ_(T) is a translation energy term weight.
 18. The non-transitory computer readable medium of claim 15, wherein the visual odometry process further comprises causing a visual representation of the estimated camera trajectory to be displayed on a display device coupled to the one or more processors.
 19. The non-transitory computer readable medium of claim 15, wherein the source imagery comprises a video recording that includes a plurality of sequential video frames.
 20. The non-transitory computer readable medium of claim 15, wherein the source imagery comprises a plurality of unorganized still images. 